package ch03.test;

import ch03.test.dao.CountDao;
import ch03.test.factory.AbstractFactory;
import ch03.test.factory.AdditionCountFactory;
import ch03.test.service.impl.CountServiceImpl;

public class Main1 {
    public static void main(String[] args) {
        AbstractFactory factory=new AdditionCountFactory();
        CountDao countDao=factory.getInstance();
        CountServiceImpl service=new CountServiceImpl();
        service.setCountDao(countDao);
        int calculate = service.calculate(5, 6);
        System.out.println(calculate);
    }

}
